#ifndef ALGBORUVKA_H
#define ALGBORUVKA_H

/*!
\file AlgBoruvka.h
\brief Contains declaration of AlgBoruvka.
\ingroup Plugins
*/

#include<Algorithm.h>
#include<ContainerElement.h>

/*!
\class AlgBoruvka
\brief Implements Boruvka's algorithm.
\ingroup Plugins
*/

class AlgBoruvka: public Algorithm{
public:
	AlgBoruvka( Graph *g );
	//!< Constructor
	~AlgBoruvka();
	//!< Destructor
	virtual void run();
	//!< Algorithm is executed here.
private:
	int containerContaining( const Node &n );
	void merge( int src, int dst, const Edge &e );
	static inline void swap( int &a, int &b );
};

#endif
